package com.tjs.lucky.domain.support.ids.policy;

import com.tjs.lucky.domain.support.ids.DefindeIdGenerator;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.stereotype.Component;
import org.springframework.util.IdGenerator;

import java.util.UUID;

/**
 * @Author: 田佳澍
 * @Description: 工具类生成 org.apache.commons.lang3.RandomStringUtils
 * @DateTime: 2023/5/23 16:06
 **/
@Component
public class RandomNumeric implements DefindeIdGenerator {
    @Override
    public long nextId() {
        return Long.parseLong(RandomStringUtils.randomNumeric(11));
    }
}
